import { RouteRecordRaw } from "vue-router";
import { Layout } from "@/router/constant";
import { renderIcon } from "@/utils/renderComponent/iconRender";
import { DashboardOutlined } from "@vicons/antd";

const routeName = "data_dictionary";

const routes: Array<RouteRecordRaw> = [
  {
    path: "/data-dictionary",
    name: routeName,
    component: Layout,
    meta: {
      title: "数据字典",
      sort: 0,
      icon: renderIcon(DashboardOutlined),
    },
    children: [
      {
        path: "department",
        name: `${routeName}_department`,
        component: () =>
          import("@/views/data-dictionary/department/DepartmentIndex.vue"),
      },
      {
        path: "material-category",
        name: `${routeName}_material_category`,
        component: () =>
          import("@/handle/views/data/name/CategoryMaterialView.vue"),
      },
      {
        path: "employee",
        name: `${routeName}_employee`,
        component: () =>
          import("@/views/data-dictionary/employee/EmployeeIndex.vue"),
      },
    ],
  },
];

export default routes;
